﻿<!DOCTYPE html>
<html class="L_UI">
<head>
    <meta charset="utf-8" />
    <title>项目周资金明细</title>
    <link href="/CSS/Main.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/Content/lib/iview/styles/iview.css">
    <style type="text/css">
        .table-body {
            border: 1px solid #BAD4E1;
            width: 100%;
            overflow-y: auto;
        }

        .table-head {
            background-color: rgb(98,178,232);
            color: #333333;
            height: 35px;
            line-height: 35px;
            font-size: 24px;
            align-content: center;
        }

            .table-head table, .table-body table {
                width: 100%;
            }

                .table-body table tr:nth-child(2n) {
                    background-color: #CCEAFD;
                    border: 1px solid #BAD4E1;
                }
        /*.table-head tr {
                background-color: rgb(98,178,232);
            }*/

        .mytrclass {
            text-align: center;
        }

            .mytrclass td {
                height: 30px;
            }

                .mytrclass td button {
                    background-color: #fff;
                    border: 1px solid rgb(45,140,240);
                    width: 120px;
                    height: 25px;
                    line-height: 25px;
                    text-align: center;
                    border-radius: 20px;
                }

            .mytrclass:hover {
                background-color: #d5e7ff;
                cursor: pointer;
            }

            .mytrclass td.left {
                text-align: left;
                text-indent: 10px;
            }
    </style>
</head>
<body>
    <div class="Window" id="app" style="min-width:1300px;">
        <div class="Header" style="height:62px;text-align:right;padding:0 10px;">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                <tr>
                    <td style="width: 7%; text-align: right; padding-right: 5px;">
                        公&nbsp;&nbsp;&nbsp;&nbsp;司：
                    </td>
                    <td style="width: 20%; text-align: left; padding-left: 10px;">
                        <thk-company v-model="FORM_COMPANY_ID" @change="DateChange('null')"></thk-company>
                    </td>
                    <td style="width: 7%; text-align: right; padding-right: 5px;">
                        周期：
                    </td>
                    <td style="text-align: left; padding: 5px;">
                        <template>
                            <thk-datepick v-model="ApplyDate" :placeholder="'选择日期'" :style="{width:'75px'}" :format="'yyyy-MM'" @change="DateChange('null')"></thk-datepick>
                        </template>
                        <button type="button" class="bt_css_s" @click="SELECT(true)">查询</button>
                    </td>
                </tr>
            </table>
        </div>
        <div class="Content" style="top:62px;" ref="TABLE_PANLE">
            <tabs value="name1">
                <tab-pane label="资金计划总表" name="name1">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>项目名称</th>
                                    <th>资金审批金额（元）</th>
                                    <th>累计已拨付资金（元）</th>
                                    <th>流入(出)率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body" v-bind:style="{height:FORM_DATA1.HEIGHT}">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA1.DATA.length==0">
                                    <tr>
                                        <td v-if="6" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA1.DATA.length>0">
                                    <template v-for="item in FORM_DATA1.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.N_PROID}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_PRONAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_AMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" v-if="item.N_TYPE==2" @click="SELECT_BANK_LIST(0,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="主营业务收入附表" name="name2">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>收入类别</th>
                                    <th>预收气款金额（元）</th>
                                    <th>本周已支付资金（元）</th>
                                    <th>流入率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA2.DATA.length==0">
                                    <tr>
                                        <td colspan="7" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA2.DATA.length>0">
                                    <template v-for="item in FORM_DATA2.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_PRONAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_AMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(1,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA2.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA2.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA2.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="天然气购入附表" name="name3">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>用户类别</th>
                                    <th>审批资金（元）</th>
                                    <th>累计已支付资金（元）</th>
                                    <th>流出率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 200px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA3.DATA.length==0">
                                    <tr>
                                        <td colspan="6" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA3.DATA.length>0">
                                    <template v-for="item in FORM_DATA3.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_USER_TYPE}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_AMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(2,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA3.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA3.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA3.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="安装外包费用附表" name="name4">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>单位名称</th>
                                    <th>累计审批金额（元）</th>
                                    <th>累计已支付资金（元）</th>
                                    <th>流出率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA4.DATA.length==0">
                                    <tr>
                                        <td colspan="7" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA4.DATA.length>0">
                                    <template v-for="item in FORM_DATA4.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_CUSTOMER_NAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_REAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(3,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA4.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA4.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA4.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="材料费用附表" name="name5">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>单位名称</th>
                                    <th>累计审批金额（元）</th>
                                    <th>累计已支付资金（元）</th>
                                    <th>流出率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 400px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA5.DATA.length==0">
                                    <tr>
                                        <td colspan="7" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA5.DATA.length>0">
                                    <template v-for="item in FORM_DATA5.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_CUSTOMER_NAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_REAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(4,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA5.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA5.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA5.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="大修费用附表" name="name6">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 350px;" />
                                <col style="width: 350px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>项目名称</th>
                                    <th>单位名称</th>
                                    <th>累计审批金额（元）</th>
                                    <th>累计已支付资金（元）</th>
                                    <th>流出率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 350px;" />
                                <col style="width: 350px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA6.DATA.length==0">
                                    <tr>
                                        <td colspan="6" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA6.DATA.length>0">
                                    <template v-for="item in FORM_DATA6.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_PRONAME}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_CUSTOMER_NAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_REAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(5,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA6.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA6.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA6.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
                <tab-pane label="城市管网项目附表" name="name7">
                    <div class="table-head">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 350px;" />
                                <col style="width: 350px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>项目名称</th>
                                    <th>单位名称</th>
                                    <th>累计审批金额（元）</th>
                                    <th>累计已支付资金（元）</th>
                                    <th>流出率</th>
                                    <th>流水详情</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="table-body">
                        <table>
                            <colgroup>
                                <col style="width: 80px;" />
                                <col style="width: 350px;" />
                                <col style="width: 350px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                                <col style="width: 150px;" />
                            </colgroup>
                            <tbody>
                                <template v-if="FORM_DATA7.DATA.length==0">
                                    <tr>
                                        <td colspan="7" align="center">没有查询到数据</td>
                                    </tr>
                                </template>
                                <template v-if="FORM_DATA7.DATA.length>0">
                                    <template v-for="item in FORM_DATA7.DATA">
                                        <tr class="mytrclass">
                                            <td style="text-align:center;">{{item.Index}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_PRONAME}}</td>
                                            <td style="padding:0 10px;text-align:left;">{{item.C_CUSTOMER_NAME}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_REAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.N_USEAMOUNT}}</td>
                                            <td style="padding:0 10px;text-align:right;">{{item.PPL}}</td>
                                            <td><button type="button" @click="SELECT_BANK_LIST(6,item)">查看银行流水</button></td>
                                        </tr>
                                    </template>
                                </template>
                                <template v-if="FORM_DATA7.DATA.length>1">
                                    <tr>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:left;">合计</th>
                                        <th></th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA7.SUM1}}</th>
                                        <th style="padding:0 10px;text-align:right;">{{FORM_DATA7.SUM2}}</th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                </template>
                            </tbody>
                        </table>
                    </div>
                </tab-pane>
            </tabs>
        </div>
    </div>
    <script src="/UserCotrols/My97DatePicker/WdatePicker.js"></script>
    <script src="/Content/lib/vue/vue-2.5.17.min.js"></script>
    <script src="/Content/lib/axios/axios.js"></script>
    <script type="text/javascript" src="/Content/lib/iview/iview.min.js"></script>
    <script src="/Scripts/jquery.1.11.1.js"></script>
    <script src="/Scripts/Thk.Utility.js"></script>
    <script src="/Scripts/Thk.Component.js"></script>
    <script type="text/javascript">
        //构造Web程序入口
        var app = new Vue({
            el: "#app",
            data: {
                name1: "",
                ApplyDate: null,
                FORM_COMPANY_ID: -1,
                FORM_DATA1: {
                    DATA: [],
                    HEIGHT: '400px'
                },
                FORM_DATA2: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                },
                FORM_DATA3: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                },
                FORM_DATA4: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                },
                FORM_DATA5: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                },
                FORM_DATA6: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                },
                FORM_DATA7: {
                    DATA: [],
                    SUM1: '',
                    SUM2: '',
                    HEIGHT: '400px'
                }
            },
            methods: {
                SELECT: function (ifload) {
                    this.$Loading.start();
                    var that = this;

                    //拼接条件
                    var data = {};
                    data.Type = 0;
                    data.Year = that.ApplyDate.getFullYear();
                    data.Month = that.ApplyDate.getMonth() + 1;
                    data.Week = that.FORM_WEEK;
                    data.CompanyId = that.FORM_COMPANY_ID;
                    var url = "/Module/DataDetail/ProjectFundDetail_Month.aspx?TYPE=API";
                    //请求主表
                    that.FORM_DATA1.DATA = [];
                    that.FORM_DATA2.DATA = [];
                    that.FORM_DATA3.DATA = [];
                    that.FORM_DATA4.DATA = [];
                    that.FORM_DATA5.DATA = [];
                    that.FORM_DATA6.DATA = [];
                    that.FORM_DATA7.DATA = [];
                    GetData1(
                        function () {
                            that.$Loading.finish();
                        },
                        function () {
                            that.$Loading.error();
                        });
                    function GetData1(sucess, erro) {
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_AMOUNT);
                                        data.Data[i].N_AMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_AMOUNT, 10000));
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA1.DATA = data.Data;
                                    GetData2(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData2(sucess, erro) {
                        data.Type = 1;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_AMOUNT);
                                        var _sum1 = data.Data[i].N_AMOUNT == null ? 0 : data.Data[i].N_AMOUNT;
                                        //console.log("加减前：Sum1:（" + sum1 + "）_Sum1:(" + _sum1 + ")");
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        //console.log("加减后：Sum1:（" + sum1 + "）");
                                        //sum1 += data.Data[i].N_AMOUNT == null ? 0 : data.Data[i].N_AMOUNT;
                                        data.Data[i].N_AMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_AMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        //sum2 += data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    console.log(sum1);
                                    that.FORM_DATA2.DATA = data.Data;
                                    that.FORM_DATA2.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA2.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    GetData3(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData3(sucess, erro) {
                        data.Type = 2;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_AMOUNT);
                                        var _sum1 = data.Data[i].N_AMOUNT == null ? 0 : data.Data[i].N_AMOUNT;
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        //sum1 += data.Data[i].N_AMOUNT == null ? 0 : data.Data[i].N_AMOUNT;
                                        data.Data[i].N_AMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_AMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        //sum2 += data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA3.DATA = data.Data;
                                    that.FORM_DATA3.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA3.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    GetData4(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData4(sucess, erro) {
                        data.Type = 3;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    console.log("XXX4");
                                    console.log(data.Data);
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_REAMOUNT);
                                        var _sum1 = data.Data[i].N_REAMOUNT == null ? 0 : data.Data[i].N_REAMOUNT;
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        data.Data[i].N_REAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_REAMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA4.DATA = data.Data;
                                    that.FORM_DATA4.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA4.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    GetData5(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData5(sucess, erro) {
                        data.Type = 4;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_REAMOUNT);
                                        var _sum1 = data.Data[i].N_REAMOUNT == null ? 0 : data.Data[i].N_REAMOUNT;
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        data.Data[i].N_REAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_REAMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA5.DATA = data.Data;
                                    that.FORM_DATA5.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA5.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    GetData6(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData6(sucess, erro) {
                        data.Type = 5;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_REAMOUNT);
                                        var _sum1 = data.Data[i].N_REAMOUNT == null ? 0 : data.Data[i].N_REAMOUNT;
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        data.Data[i].N_REAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_REAMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA6.DATA = data.Data;
                                    that.FORM_DATA6.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA6.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    GetData7(sucess, erro);
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetData7(sucess, erro) {
                        data.Type = 6;
                        axios.post(url, JSON.stringify(data))
                            .then(result => {
                                if (result.status != 200 || result.data.Type != 1) {
                                    erro();
                                    return;
                                }
                                var data = result.data.Data;
                                var sum1 = 0;
                                var sum2 = 0;
                                if (data.Data.length > 0) {
                                    for (var i = 0; i < data.Data.length; i++) {
                                        data.Data[i].Index = i + 1;
                                        data.Data[i].PPL = GetPPL(data.Data[i].N_USEAMOUNT, data.Data[i].N_REAMOUNT);
                                        var _sum1 = data.Data[i].N_REAMOUNT == null ? 0 : data.Data[i].N_REAMOUNT;
                                        sum1 = window.Helper.Float.add(sum1, _sum1);
                                        data.Data[i].N_REAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_REAMOUNT, 10000));
                                        var _sum2 = data.Data[i].N_USEAMOUNT == null ? 0 : data.Data[i].N_USEAMOUNT;
                                        sum2 = window.Helper.Float.add(sum2, _sum2);
                                        data.Data[i].N_USEAMOUNT = window.Helper.Float.QyFormat(window.Helper.Float.mul(data.Data[i].N_USEAMOUNT, 10000));
                                    }
                                    that.FORM_DATA7.DATA = data.Data;
                                    that.FORM_DATA7.SUM1 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum1, 10000));
                                    that.FORM_DATA7.SUM2 = window.Helper.Float.QyFormat(window.Helper.Float.mul(sum2, 10000));
                                    sucess();
                                }
                                else {
                                    sucess();
                                }
                            });
                    }
                    function GetPPL(a, b) {
                        if (a == 0 || b == 0 || a == undefined || b == undefined || a == null || b == null) {
                            return "";
                        }
                        var str = window.Helper.Float.mul(window.Helper.Float.div(a, b), 100).toFixed(2);
                        return str + '%';
                    }
                },
                PAGE_SIZE_CHANG: function (size) {
                    //this.FORM_DATA.CURRENT_PAGE = size;
                    //this.SELECT(false);
                    this.FORM_DATA.PAGE_SIZE = size;
                    this.SELECT(true);
                },
                PAGE_CHANGE: function (size) {
                    this.FORM_DATA.CURRENT_PAGE = size;
                    this.SELECT(false);
                },
                SORT_CHANG: function (column, key, order) {

                },
                AUTO_MATCHING: function () {

                },
                GET_QUERY_STRING: function (name) {
                    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                    var r = window.location.search.substr(1).match(reg);
                    if (r != null) return unescape(r[2]);
                    return null;
                },
                DateChange: function () {
                    this.SELECT();
                },
                SELECT_BANK_LIST: function (type, item) {
                    var option = {
                        Url: "/Module/ProjectDetails/BankList_ProjectDetails.html",
                        Title: "银行流水明细",
                        Area: ['1200px', '600px']
                    };
                    var parms = {};
                    parms.TYPE_CODE = "MONTH";
                    parms.TYPE_KEY = type;
                    parms.YEAR = this.ApplyDate.getFullYear();
                    parms.MONTH = this.ApplyDate.getMonth() + 1;
                    parms.CMY_ID = this.FORM_COMPANY_ID;
                    switch (type) {
                        case 0:
                            parms.PRO_ID = item.N_PROID;
                            break;
                        case 1:
                            parms.TYPE_NAME = item.C_PRONAME;
                            break;
                        case 2:
                            parms.USER_TYPE = item.C_USER_TYPE;
                            break;
                        case 3:
                            parms.CUSTOMER_NAME = item.C_CUSTOMER_NAME;
                            break;
                        case 4:
                            parms.CUSTOMER_NAME = item.C_CUSTOMER_NAME;
                            break;
                        case 5:
                            parms.CUSTOMER_NAME = item.C_CUSTOMER_NAME;
                            parms.PROJECT_NAME = item.C_PRONAME;
                            break;
                        case 6:
                            parms.CUSTOMER_NAME = item.C_CUSTOMER_NAME;
                            parms.PROJECT_NAME = item.C_PRONAME;
                            break;
                        default:
                            return;
                    }
                    console.log(window.Helper);
                    option.Url += window.Helper.Url.ParmsToString(parms);
                    console.log(option);
                    top.MessageBox.Load(option);
                }
            },
            mounted: function () {
                var that = this;
                console.log(top.LoginUser);
                that.ApplyDate = new Date();
                that.FORM_WEEK = 1;
                that.FORM_COMPANY_ID = top.LoginUser.USER_COMPANY;
                window.App = that;
                that.FORM_DATA1.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA2.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA3.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA4.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA5.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA6.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.FORM_DATA7.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                that.SELECT(true);
                window.onresize = function () {
                    that.FORM_DATA1.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA2.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA3.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA4.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA5.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA6.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                    that.FORM_DATA7.HEIGHT = (that.$refs.TABLE_PANLE.clientHeight - 85) + "px";
                };
            }
        });
    </script>
</body>
</html>